<script>
import KtTable from "/src/components/node-kantboot/components/KtTable/KtTable.vue";
// import columns from "./config/columns.config.js"
// import LevelConditionDialog from "./components/LevelConditionDialog.vue"
let columns=[
  {
    label: "ID",
    field: "id",
    type: "number",
    isId: true,
    isSearch: true,
    isEdit: false,
    searchSetting: {
      // 操作编码
      operatorCode: "eq",
    }
  },
  {
    label: "图标",
    field: "fileIdOfIcon",
    type: "img",
    width: "100px",
    isEdit: true,
    isSearch: false,
    isAdd: true,
    setting: {
      type: "id",
      groupCode: "talentTitleLevel",
    }
  },
  {
    label: "等级数值",
    field: "number",
    type: "text",
    width: "200px",
    isSort: true,
    orderBy: "desc",
    // 是否可编辑
    isEdit: true,
    isSearch: true,
    isAdd: true,
    searchSetting: {
      // 操作编码: 闭区间
      operatorCode: "closeInterval",
    }
  },
  {
    label: "职称等级名称",
    field: "name",
    type: "text",
    width: "200px",
    // 是否可编辑
    isEdit: true,
    isSearch: true,
    isAdd: true,
  },
  {
    label: "备注",
    field: "remark",
    type: "text",
    width: "200px",
    // 是否可编辑
    isEdit: true,
    isSearch: true,
    isAdd: true,
  },

  {
    label: "创建时间",
    field: "gmtCreate",
    type: "datetime",
    width: "200px",
    // 是否可编辑
    isEdit: false,
    isSearch: true,
    isAdd: false,
    setting: {
      format: "YYYY-MM-DD hh:mm:ss"
    }
  }
]
export default {
  components: { KtTable},
  data() {
    return {
      columns
    }
  },
  mounted() {
  },
  methods: {
    openLevelDialogDialog(row) {
      // this.$refs.levelConditionDialog.open(row);
    }
  }
}
</script>

<template>
  <kt-table
      :columns="columns"
      requestUri="/business-talent-web/admin/titleLevel"
      ref="ktTable">
    <template #operationAppend="{row}">
      <div>
        <el-button
        @click="openLevelDialogDialog(row)"
        >获得此等级的条件</el-button>
      </div>
    </template>
  </kt-table>

</template>

<style scoped>

</style>